//mock的核心文件
//1.cnpm i -s mackjs
//2.伪造接口
//3.mock/index.js   在main.js 注入一下
import Mock from 'mockjs'

//home的接口
import homeData from './homeData'
import userList from './userList'

import logData from './logData'
//接口名 /outdoorTemp  请求室外温度
//参数1  接口的正则表达式，注意正则没有引号
//参数2  请求类型  get post put delete
//参数3  就是返回给前端的数据
Mock.mock(/\/sBut/, 'get', homeData.sBut)
Mock.mock(/\/toD/, 'get', homeData.toD)
Mock.mock(/\/outdoorTemp/, 'post', homeData.outdoorTemp)
Mock.mock(/\/environmentalHum/, 'post', homeData.environmentalHum)
Mock.mock(/\/soilMois/, 'post', homeData.soilMois)
Mock.mock(/\/critical/, 'get', homeData.critical)
Mock.mock(/\/MapData/, 'get', homeData.MapData)
Mock.mock(/\/soilMois/, 'post', homeData.soilMois);
// 接口  登陆
Mock.mock(/\/login/, 'post', userList.loginData);
//接口 获取用户信息
Mock.mock(/\/getuser/, 'post', userList.getUserData);
Mock.mock(/\/modify/, 'post', userList.modifyLogin);

import greenHouseData from './greenHouse'
Mock.mock(/\/newHouse/, 'post', greenHouseData.nHouse)

// detail 详情页接口
// import Mock from 'mockjs'

import detailData from './detailData'

Mock.mock(/\/getOutdoorTemp/,'post',detailData.getOutdoorTemp)

Mock.mock(/\/getTemperature/,'post',detailData.getTemperature)

Mock.mock(/\/getWeekTem/,'post',detailData.getWeekTem)

Mock.mock(/\/getMonthTem/,'post',detailData.getMonthTem)

Mock.mock(/\/log/, 'get', logData.getLogData)
